import {
  post,
  get,
  put,
  dalete,
  postJosn,
  putone,
  patch
} from '../utils/request';

// //查询门店商品列表
export function queryStockGoods(data) {
  return post('/api/goods-service/v1/goods/queryGoodsByPage', data);
}

//查询门店商品列表/api/goods-service/v1/        goodsPrice/queryStockGoods
// export function queryStockGoods(data) {
//   return post('/api/goods-service/v1/goods/queryStoreGoods', data);
// }

// //查询会员等级
// export function queryMemberRules(data) {
//   return post('/api//member-service/v1/memberRule/queryMemberRules', data);
// }
//查询积分方式
export function queryBonusPointRules(data) {
  return post('/api/member-service/v1/memberRule/queryBonusPointRules', data);
}

//保存积分规则
export function saveBonusPointRule(data) {
  return post('/api/member-service/v1/memberRule/saveBonusPointRule', data);
}


//查询积分规则
export function queryMember(data) {
  return post('/api/member-service/v1/BonuspointRule/queryMember', data);
}

//更新积分规则
export function updateMember(data) {
  return post('api/member-service/v1/BonuspointRule/updateMember', data);
}

//查询活跃度商品
export function queryActivationGoods(data) {
  return get('/api/data-service/StoreActivation/queryActivationGoods', data);
  // return get('http://127.0.0.1:18080/api/data-service/StoreActivation/queryActivationGoods', data);
}

//更新活跃度商品
export function updateActivationGoods(data) {
  return post('api/data-service/StoreActivation/updateActivationGoods?goodsId=' + data.goodsId);
  // return post('http://127.0.0.1:18080/api/data-service/StoreActivation/updateActivationGoods?goodsId=' + data.goodsId);
}

//获取积分规则设置信息
export function queryBonuspointRuleConfig(data) {
  return post('/api/member-service/v1/BonuspointRule/queryBonuspointRuleConfig', data);
  //return post('http://127.0.0.1:18080/api/member-service/v1/BonuspointRule/queryBonuspointRuleConfig', data);
}

//挑选商品
export function queryChooseGoodsList(data) {
  return post('/api/goods-service/v1/foreignGoods/qryBuyFreeGoodsList', data)
  //return post('http://127.0.0.1:18080/api/goods-service/v1/foreignGoods/qryBuyFreeGoodsList', data);
}

//保存积分规则设置信息
export function saveBonuspointRuleConfig(data) {
  return post('/api/member-service/v1/BonuspointRule/saveBonuspointRuleConfig', data);
  //return post('http://127.0.0.1:18080/api/member-service/v1/BonuspointRule/saveBonuspointRuleConfig', data);
}